'\" te
.\" Copyright (c) 2002, Sun Microsystems, Inc.
.\" All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH RTQUERY 8 "Apr 24, 2002"
.SH NAME
rtquery \- query routing daemons for their routing tables
.SH SYNOPSIS
.LP
.nf
\fBrtquery\fR [\fB-np1\fR] [\fB-w\fR \fItimeout\fR] [\fB-r\fR \fIaddr\fR] [\fB-a\fR \fIsecret\fR] \fIhost\fR...
.fi

.LP
.nf
\fBrtquery\fR [\fB-t\fR \fIoperation\fR] \fIhost\fR...
.fi

.SH DESCRIPTION
.sp
.LP
The \fBrtquery\fR command is used to query a RIP network routing daemon,
\fBin.routed\fR(8) or \fBGateD\fR, for its routing table by sending a request
or poll command. The routing information in any routing response packets
returned is displayed numerically and symbolically.
.sp
.LP
By default, \fBrtquery\fR uses the request command. When the -p option is
specified, \fBrtquery\fR uses the poll command, an undocumented extension to
the RIP protocol supported by \fBGateD\fR. When querying \fBGateD\fR, the poll
command is preferred over the request command because the response is not
subject to Split Horizon and/or Poisoned Reverse, and because some versions of
\fBGateD\fR do not answer the request command. \fBin.routed\fR does not answer
the poll command, but recognizes requests coming from \fBrtquery\fR and so
answers completely.
.sp
.LP
The \fBrtquery\fR command is also used to turn tracing on or off in
\fBin.routed\fR.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-a\fR \fBpasswd=\fR\fIXXX\fR\fR
.ad
.br
.na
\fB\fB-a\fR \fBmd5_passwd=\fR\fIXXX\fR|\fIKeyID\fR\fR
.ad
.RS 27n
Causes the query to be sent with the indicated cleartext or MD5 password.
.RE

.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.RS 27n
Displays only the numeric network and host addresses instead of both numeric
and symbolic names.
.RE

.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.RS 27n
Uses the poll command to request full routing information from \fBGateD\fR.
This is an undocumented extension RIP protocol supported only by \fBGateD\fR.
.RE

.sp
.ne 2
.na
\fB\fB-r\fR \fIaddr\fR\fR
.ad
.RS 27n
Asks about the route to destination \fIaddr\fR.
.RE

.sp
.ne 2
.na
\fB\fB-t\fR \fIoperation\fR\fR
.ad
.RS 27n
Changes tracing, where \fIoperation\fR is one of the actions listed below.
Requests from processes not running with UID 0 or on distant networks are
generally ignored by the daemon except for a message in the system log.
\fBGateD\fR is likely to ignore these debugging requests.
.sp
.ne 2
.na
\fBon=\fItracefile\fR\fR
.ad
.RS 16n
Turns tracing on, directing tracing into the specified file. That file must
have been specified when the daemon was started or have the name,
\fB/var/log/in.routed.trace\fR.
.RE

.sp
.ne 2
.na
\fBmore\fR
.ad
.RS 16n
Increases the debugging level.
.RE

.sp
.ne 2
.na
\fBoff\fR
.ad
.RS 16n
Turns off tracing.
.RE

.sp
.ne 2
.na
\fBdump\fR
.ad
.RS 16n
Dumps the daemon's routing table to the current trace file.
.RE

.RE

.sp
.ne 2
.na
\fB\fB-w\fR \fItimeout\fR\fR
.ad
.RS 27n
Changes the delay for an answer from each host. By default, each host is given
15 seconds to respond.
.RE

.sp
.ne 2
.na
\fB\fB-1\fR\fR
.ad
.RS 27n
Queries using RIP version 1 instead of RIP version 2.
.RE

.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
Successful completion.
.RE

.sp
.ne 2
.na
\fB>\fB0\fR\fR
.ad
.RS 6n
An error occurred.
.RE

.SH SEE ALSO
.sp
.LP
\fBin.routed\fR(8),  \fBicmp\fR(4P),
.BR inet (4P),
.BR udp (4P),
.BR gateways (5),
.BR attributes (7),
.BR route (8)
.sp
.LP
\fIRouting Information Protocol, RIPv1, RFC 1058\fR
.sp
.LP
\fIRouting Information Protocol, RIPv2, RFC 2453, STD 0056\fR
